<?php
$ArSectors = Dracosys::getSessionValue(SESSION_INTERFACE, 'SectorsList');
?>
<h2>Busca de Chamado</h2>
<section id="CalledSearch">
    <form method="post" action="<?=DRA_URL?>atendimento/resultado-busca" name="FormBuscarChamado">
        <div class="toggleContainer" id="CalledSearch_toggleSimple"><a href="#" class="toggle Up" rel="CalledSearch_Simple">Busca Simples</a></div>
        <section id="CalledSearch_Simple" class="section-update">
            <div class="out_txt big"><label for="CalledSearch_IDChamado">Busca Por Id</label></div>
            <div class="inp_txt big"><input type="text" name="IDChamado" id="CalledSearch_IDChamado" /></div>
        </section>
        <div class="toggleContainer" id="CalledSearch_toggleAdvanced"><a href="#" class="toggle Down" rel="CalledSearch_Advanced">Busca Avançada</a></div>
        <section id="CalledSearch_Advanced" class="section-update" style="display:none;">
            <div class="out_txt big"><label for="CalledSearch_Customer">Cliente</label></div>
            <div class="inp_txt big"><input type="text" name="StCliente" id="CalledSearch_Customer" value="" /></div>
            <div class="out_txt big"><label for="CalledSearch_Employee">Responsável</label></div>
            <div class="inp_txt big"><input type="text" name="StResponsavel" id="CalledSearch_Employee" value="" /></div>
            <div class="out_txt big"><label for="CalledSearch_IDSetor">Setor</label></div>
            <div class="inp_txt big">
                <select id="CalledSearch_IDSector" name="IDSetor">
                    <option value="">Selecione um Setor</option>
                    <?php foreach($ArSectors as $Sector): ?>
                        <option value="<?=$Sector->getIDSetor()?>"><?=$Sector->getStNome()?></option>
                    <?php endforeach; ?>
                </select>
            </div>
            <div class="out_txt big">Status</div>
            <div class="inp_txt big">
                <input type="radio" name="EnStatus" value="CLIENTE" class="radio" id="CalledSearch_StatusCliente" /> <label for="CalledSearch_StatusCliente">Aguardando Cliente</label>
                <input type="radio" name="EnStatus" value="ATENDENTE" class="radio" id="CalledSearch_StatusAtendente" /> <label for="CalledSearch_StatusAtendente">Aguardando Atendente</label><br />
                <input type="radio" name="EnStatus" value="TELEFONICO" class="radio" id="CalledSearch_StatusTelefonico" /> <label for="CalledSearch_StatusTelefonico">Telefônico</label>
                <input type="radio" name="EnStatus" value="FECHADO" class="radio" id="CalledSearch_StatusFechado" /> <label for="CalledSearch_StatusFechado">Fechado</label>
            </div>
            <div class="out_txt big"><label for="CalledSearch_StTitulo">Título</label></div>
            <div class="inp_txt big"><input type="text" name="StTitulo" id="CalledSearch_StTitulo" value="" /></div>
            <div class="out_txt big"><label for="CalledSearch_DtCriacao">Data da Criação</label></div>
            <div class="inp_txt big"><input type="text" name="DtCriacao" id="CalledSearch_DtCriacao" value="" class="Date" /></div>
            <div class="out_txt big"><label for="CalledSearch_DtFechamento">Data de Fechamento</label></div>
            <div class="inp_txt big"><input type="text" name="DtFechamento" id="CalledSearch_DtFechamento" value="" class="Date" /></div>
            <div class="out_txt big">Tipo</div>
            <div class="inp_txt big">
                <input type="radio" name="EnTipo" value="EXTERNO" class="radio" id="CalledSearch_TipoExterno" /> <label for="CalledSearch_TipoExterno">Externo</label>
                <input type="radio" name="EnTipo" value="INTERNO" class="radio" id="CalledSearch_TipoInterno" /> <label for="CalledSearch_TipoInterno">Interno</label>
                <input type="radio" name="EnTipo" value="TELEFONICO" class="radio" id="CalledSearch_TipoTelefonico" /> <label for="CalledSearch_TipoTelefonico">Telefônico</label>
            </div>
            <div class="out_txt big">Prioridade</div>
            <div class="inp_txt big">
                 <input type="radio" name="BoPrioridade" id="CalledSearch_PrioridadeTrue" value="TRUE" class="radio" />
                 <label for="CalledSearch_PrioridadeTrue">Sim</label>
                 <input type="radio" name="BoPrioridade" id="CalledSearch_PrioridadeFalse" value="FALSE" class="radio" />
                 <label for="CalledSearch_PrioridadeFalse">Não</label>
            </div>
            <div class="out_txt big">Obedecer a todas as condições?</div>
            <div class="inp_txt big">
                 <input type="radio" name="FilterType" id="CalledSearch_Sim" value="AND" class="radio" />
                 <label for="CalledSearch_Sim">Sim</label>
                 <input type="radio" name="FilterType" id="CalledSearch_Nao" value="OR" class="radio" checked="checked" />
                 <label for="CalledSearch_Nao">Não</label>
            </div>
        </section>
        <div class="btn"><button class="v1">PESQUISAR</button></div>
    </form>
</section>